home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '91 / '91 Attendee Contributions / Rotate Src / Rotate.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-17  |  3.4 KB  |  102 lines  |  [TEXT/MPS ]

  1. /* Constants for Rotate a Bitmap program */
  2.  
  3. #define scale            1                     /* use 2 for 1024 pixel wide screen */
  4.  
  5. #define    kScreenHeight    scale*342
  6. #define    kScreenWidth    scale*512
  7. #define    kWindowBase        (18+20)                /* Menubar & Window Header */
  8. #define    kWindowHeight    (kScreenHeight - kWindowBase)
  9. #define    kWindowWidth    (kScreenWidth)
  10.  
  11. /* Resource ID constants for Rotate a Bitmap program */
  12.  
  13. #define rBell                1024            /* Resource ID of Bell Pict */
  14.  
  15. #define    rWindow                128             /* Resource ID of the Window */
  16.  
  17. #define    rMenuBar            128             /* Resource ID of Menubar */
  18.  
  19. #define    mApple                128             /* Resource IDs of Menus */
  20. #define    aboutMeCommand        1
  21.  
  22. #define    mFile                 129
  23. #define    quitCommand         1
  24.  
  25. #define    mImage                 130
  26. #define    GarbageCommand         1
  27. #define    BlackCommand         2
  28. #define    WhiteCommand         3
  29. #define    BellCommand         5
  30. #define    StretchCommand         6
  31.  
  32. #define    mRotate             131
  33. #define    RotAllCommand         1
  34. #define    Rot0Command         3                /* the 8 rotations start with this one */
  35.  
  36. #define    rTextStr            128                /* Alert text strings */
  37. #define    kAboutText            1                /* About box text */
  38. #define    kNoBell                2                /* Can't find the Bell */
  39.  
  40. #define    rMsg                128                /* For the About Rotate... message */
  41. #define    rAlert                129                /* general error alert */
  42.  
  43. /*    Apple Human Interface Note# 10 for Dialog and Alert Box layout.    */
  44.  
  45. #define kIconSize            32                /* Standard icon size */
  46.  
  47. #define kSpaceStd            13                /* White space between most elements */
  48. #define kSpaceIcon            23                /* White space to left & right of icon */
  49. #define kInsetStd        (kSpaceStd-3)        /* Standard white space inset */
  50. #define kInsetIcon        (kSpaceIcon-3)        /* White space inset of icon */
  51.  
  52. #define kLineHeight            16                /* height of a single line of Chicago-12 */
  53. #define kButtonHeight        20                /* standard button height */
  54. #define kCancelLen            41                /* width of 'Cancel' in Chicago-12 */
  55. #define kButtonWidth    (kCancelLen+18)        /* standard button width */
  56. #define kContinueLen        62                /* width of 'Continue' in Chicago-12 */
  57. #define kContinueWidth    (kContinueLen+18)    /* 'Continue' button width */
  58.  
  59. /*    Alert Box definition */
  60.  
  61. #define kAlertWidth            300                /* Width of the Alert */
  62. #define kAlertTextLines         3                /* Number of text lines in Alert */
  63. #define kAlertTop            60
  64. #define KAlertLeft            ((512 - kAlertWidth)/2)
  65.  
  66. #define kAlertIconLeft        kInsetIcon
  67. #define kAlertIconRight        (kAlertIconLeft+kIconSize)
  68. #define kAlertIconTop        kInsetStd
  69. #define kAlertIconBottom    (kAlertIconTop+kIconSize)
  70.  
  71. #define kAlertTextLeft        (kAlertIconRight + kSpaceIcon - 1)
  72. #define kAlertTextRight        (kAlertWidth - kInsetStd)
  73. #define kAlertTextTop        kInsetStd
  74. #define kAlertTextBottom    (kAlertTextTop + (kAlertTextLines * kLineHeight))
  75.  
  76. #define kAlertButtonTop        (kAlertTextBottom + kSpaceStd)
  77. #define kAlertButtonBottom    (kAlertButtonTop + kButtonHeight)
  78.  
  79. #define kAlertOkRight        (kAlertWidth - kInsetStd)
  80. #define kAlertOkLeft        (kAlertOkRight - kButtonWidth)
  81.  
  82. #define kAlertHeight        (kAlertButtonBottom + kInsetStd)
  83.  
  84. /*    Message Box definition */
  85.  
  86. #define kMsgWidth            300                /* Width of the Message dialog */
  87. #define kMsgTextLines        7                /* Number of text lines in Message */
  88.  
  89. #define kMsgTextLeft        (2*kInsetStd)
  90. #define kMsgTextRight        (kMsgWidth - kMsgTextLeft)
  91. #define kMsgTextTop            kInsetStd
  92. #define kMsgTextBottom        (kMsgTextTop + (kMsgTextLines * kLineHeight))
  93.  
  94. #define kMsgButtonTop        (kMsgTextBottom + kSpaceStd)
  95. #define kMsgButtonBottom    (kMsgButtonTop + kButtonHeight)
  96.  
  97. #define kMsgOkRight            (kMsgWidth - kInsetStd)
  98. #define kMsgOkLeft            (kMsgOkRight - kContinueWidth)
  99.  
  100. #define kMsgHeight            (kMsgButtonBottom + kInsetStd)
  101.  
  102.